﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Entity;

namespace MvcSecCamStore.Models
{
    public class SampleData : DropCreateDatabaseAlways<SecCamStoreEntities>
    {
        protected override void Seed(SecCamStoreEntities context)
        {
            var camtypes = new List<Camtype>
            {
                new Camtype { Name = "IR DOME Camera" },
                new Camtype { Name = "DOME Camera" },
                new Camtype { Name = "BOX Camera" },
                new Camtype { Name = "IR Camera" },
                new Camtype { Name = "PTZ Camera" }
            };

            var manufacts = new List<Manufact>
            {
                new Manufact { Name = "SONY" },
                new Manufact { Name = "SAMSUNG" },
                new Manufact { Name = "LG" },
                new Manufact { Name = "BOSCH" },
                new Manufact { Name = "HONEYWELL" }
            };

            new List<Cam>
            {
                new Cam { Title = "CH03515 - 1/3 Sony Super HAD II CCD 400 TVL IR Dome Camera", Camtype = camtypes.Single(g => g.Name == "IR DOME Camera"), Price = 44.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03515.jpg" },
                new Cam { Title = "CH03516 - 1/3 Sony Super HAD II CCD 530 TVL IR Dome Camera", Camtype = camtypes.Single(g => g.Name == "IR DOME Camera"), Price = 56.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03515.jpg" },
                new Cam { Title = "CH03512 - 1/3 Sony Super HAD II CCD 580 TVL Day & Night IR Dome Camera", Camtype = camtypes.Single(g => g.Name == "IR DOME Camera"), Price = 97.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03515.jpg" },
                new Cam { Title = "CH03506 - 1/3 Sony Super HAD II CCD 530 TVL Day & Night Vandal IR Dome Camera IP 65", Camtype = camtypes.Single(g => g.Name == "IR DOME Camera"), Price = 129.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03506.jpg" },
                new Cam { Title = "CH03507 - 1/3 Sony Super HAD II CCD 580 TVL Day & Night Vandal IR Dome Camera IP 65", Camtype = camtypes.Single(g => g.Name == "IR DOME Camera"), Price = 159.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03506.jpg" },
                new Cam { Title = "CH03508 - 1/3 Sony Super HAD II CCD 600 TVL Day & Night Vandal IR Dome Camera IP 65", Camtype = camtypes.Single(g => g.Name == "IR DOME Camera"), Price = 154.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03506.jpg" },
                new Cam { Title = "CH03509T - 1/3 Sony Double Scan CCD 560 TVL True Day & Night Vandal IR Dome Camera IP 65", Camtype = camtypes.Single(g => g.Name == "IR DOME Camera"), Price = 189.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03506.jpg" },                                

                new Cam { Title = "CH03203 - 1/3 Sony Super HAD II CCD 580 TVL Day & Night Vandal Dome Camera IP 65", Camtype = camtypes.Single(g => g.Name == "DOME Camera"), Price = 159.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03203.jpg" },                                
                new Cam { Title = "CH03213 - 1/3 Sony Super HAD II CCD 400 TVL Dome Camera", Camtype = camtypes.Single(g => g.Name == "DOME Camera"), Price = 36.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03213.jpg" },                                
                new Cam { Title = "CH03214 - 1/3 Sony Super HAD II CCD 530 TVL Dome Camera", Camtype = camtypes.Single(g => g.Name == "DOME Camera"), Price = 47.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03214.jpg" },                                
                new Cam { Title = "CH01206 - 1/3 Color CCD 420 TVL Vandal Dome Camera", Camtype = camtypes.Single(g => g.Name == "DOME Camera"), Price = 59.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch01206.jpg" },                                
                new Cam { Title = "CH01203 - 1/3 Color CCD 470 TVL Color Dome Camera", Camtype = camtypes.Single(g => g.Name == "DOME Camera"), Price = 59.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch01203.jpg" },                                
                new Cam { Title = "CH01207 - 1/3 Color CCD 470 TVL Vandal Dome Camera", Camtype = camtypes.Single(g => g.Name == "DOME Camera"), Price = 69.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch01207.jpg" },                                
                new Cam { Title = "CH03211 - 1/3 Sony Super HAD II CCD 580 TVL Day & Night Dome Camera", Camtype = camtypes.Single(g => g.Name == "DOME Camera"), Price = 91.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03211.jpg" },                                
                new Cam { Title = "CH03202 - 1/3 Sony Super HAD II CCD 530 TVL Day & Night Vandal Dome Camera IP 65", Camtype = camtypes.Single(g => g.Name == "DOME Camera"), Price = 129.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03202.jpg" },                                
                new Cam { Title = "CH03204 - 1/3 Sony Super HAD II CCD 600 TVL Day & Night Vandal Dome Camera IP 65", Camtype = camtypes.Single(g => g.Name == "DOME Camera"), Price = 169.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03204.jpg" },                                

                new Cam { Title = "CH01101 - 1/3 Color CCD 470 TVL Color Box Camera", Camtype = camtypes.Single(g => g.Name == "BOX Camera"), Price = 56.00M, Manufact = manufacts.Single(a => a.Name == "HONEYWELL"), CamManufactUrl = "/Content/Images/ch01101.jpg" },                                
                new Cam { Title = "CH03101 - 1/3 Sony Super HAD II CCD 580 TVL Day & Night Color Box Camera", Camtype = camtypes.Single(g => g.Name == "BOX Camera"), Price = 99.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03101.jpg" },                                

                new Cam { Title = "CH01308 - 1/3 Color CCD 420 TVL IR Camera", Camtype = camtypes.Single(g => g.Name == "IR Camera"), Price = 39.00M, Manufact = manufacts.Single(a => a.Name == "HONEYWELL"), CamManufactUrl = "/Content/Images/ch01308.jpg" },                                
                new Cam { Title = "CH03310 - 1/3 Sony Super HAD II CCD 530 TVL Color IR Pipe Camera IP 66", Camtype = camtypes.Single(g => g.Name == "IR Camera"), Price = 99.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch03310.jpg" },                                

                new Cam { Title = "CH02409 - 1/4 Sony Ex-View HAD CCD 470 TVL True Day/Night PTZ Camera", Camtype = camtypes.Single(g => g.Name == "PTZ Camera"), Price = 39.00M, Manufact = manufacts.Single(a => a.Name == "HONEYWELL"), CamManufactUrl = "/Content/Images/ch02409.gif" },                                
                new Cam { Title = "CH02409(Outdoor)-1/4 Sony Ex-View HAD CCD 470 TVL True Day/Night PTZ Camera", Camtype = camtypes.Single(g => g.Name == "PTZ Camera"), Price = 99.00M, Manufact = manufacts.Single(a => a.Name == "SONY"), CamManufactUrl = "/Content/Images/ch02409_outdoor.gif" },                                
            }.ForEach(a => context.Cams.Add(a));
        }
    }
}